@extends('front.layout')
@section('title','多瑞吉')
@section('review','class=current')
@section('content')
    <div class="main">
        <?php
        function curPageURL() {
            $pageURL = 'http';
            error_reporting(0);
            if ($_SERVER["HTTPS"] == "on") {    // 如果是SSL加密则加上“s”
                $pageURL .= "s";
            }
            $pageURL .= "://";
            if ($_SERVER["SERVER_PORT"] != "80") {
                $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
            } else {
                $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
            }
            return $pageURL;
        }
        include ("./phpqrcode/phpqrcode.php");
        function getQRcode($data,$outfile){
            $Qrcode=new QRcode();
            $Qrcode->png($data,$outfile,'L',10);//前两个参数：文字（二维码的内容） 输出路径
        }
        $data=curPageURL();
        $outfile="./assets/images/xiangqing.png";
        getQRcode($data,$outfile);
        ?>
        <div class="past_top clearfix">
            <div class="past_left">
                <div class="past_left_title">{{$video->title}}</div>
                <div class="past_left_video">
                    <div class="video" style="width: 600px;height: 400px;"></div>
                    <script type="text/javascript">
                        var videoObject = {
                            container: '.video',
                            video: '{{$video->video}}'
                        };
                        new ckplayer(videoObject);
                    </script>
                </div>
                <div class="online_class_share">
                    <span>分享到：</span>
                    <a href="javascript:void(show())"><img src="/assets/images/icon_weixin.jpg" /></a>
                </div>
            </div>
            <div class="past_right">
                <div class="past_intro">
                    <div class="title_box">本期简介</div>
                    <div class="past_intro_body">
                        <p>{!! $video->info !!}</p>
                    </div>
                </div>
                @if(isset($oVideos[0]))
                    <div class="past_other">
                        <div class="past_other_title">其他讲堂</div>
                        <div class="past_other_list">
                            <div class="past_other_ship">
                                <a href="/review/info/{{$oVideos[0]->id}}"><img src="{{$oVideos[0]->image}}" /></a>
                            </div>
                        </div>
                    </div>
                @endif
            </div>
        </div>
        <div class="past_export">
            <div class="title_box">本期嘉宾</div>
            @foreach($video->middle as $v)
                <div class="export_this_list">
                    <div class="export_this_ship clearfix">
                        <div class="left_export"><img src="{{$v->image}}" width="264" height="155"/></div>
                        <div class="right_export">
                            <div class="export_base">
                                <p class="name">{{$v->name}} {{$v->hosptial}}</p>
                                <p><b>科室：</b>{{$v->department}}</p>
                                <p><b>职称：</b>{{$v->title}}</p>
                            </div>
                            <div class="export_this_intro">
                                <p>{!! $v->introduce !!}</p>
                                <div class="export_edu clearfix">
                                    <div class="edu_title">接受教育：</div>
                                    <div class="edu_info">
                                        <p>{!! $v->education !!}}</p>
                                        <p><a href="/expert/info/{{$v->id}}">【详情】</a></p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            @endforeach
        </div>
        <!--微信分享弹窗-->
        <div class="shadow" id="shadow" style="display:none"></div>
        <div class="chat_pop" style="display:none" id="chat_pop">
            <div class="chat_pop_top"><a href="javascript:void(hide())" class="chat_pop_close"></a></div>
            <div class="chat_pop_body">
                <img src="/assets/images/xiangqing.png" />
                <p>使用微信扫一扫，并将网页分享给好友</p>
            </div>
        </div>
    </div>
@endsection
